import request from '@/utils/request'

// 查询用户动态列表
export function listDynamic(query) {
  return request({
    url: '/dynamic/dynamic/list',
    method: 'get',
    params: query
  })
}

// 查询用户动态详细
export function getDynamic(id) {
  return request({
    url: '/dynamic/dynamic/' + id,
    method: 'get'
  })
}

// 新增用户动态
export function addDynamic(data) {
  return request({
    url: '/dynamic/dynamic',
    method: 'post',
    data: data
  })
}

// 修改用户动态
export function updateDynamic(data) {
  return request({
    url: '/dynamic/dynamic',
    method: 'put',
    data: data
  })
}

// 删除用户动态
export function delDynamic(id) {
  return request({
    url: '/dynamic/dynamic/' + id,
    method: 'delete'
  })
}

// 导出用户动态
export function exportDynamic(query) {
  return request({
    url: '/dynamic/dynamic/export',
    method: 'get',
    params: query
  })
}
// 查询用户动态评论
export function listPlDynamic(query) {
  return request({
    url: '/dynamic/pl/list?dyId='+query,
    method: 'get',
    //params: query
  })
}
// 删除用户评论
export function delDynamicb(id) {
  return request({
    url: '/dynamic/pl/' + id,
    method: 'delete'
  })
}
